home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_m_p / pwez51.zip / SCRLFILE.DOC < prev    next >
Text File  |  1992-04-01  |  4KB  |  71 lines

  1.  
  2.  
  3.  
  4.                             SCROLLING THROUGH DATA FILES
  5.  
  6.          An attempt to make a scroll window scroll through a large data
  7.          file may be handled in one of two ways.
  8.  
  9.          1. The first involves bringing a string representation of all
  10.             of the records into the scroll window.  Each record is
  11.             converted to an element of a string array which is in turn
  12.             used by routine SCRLWIND to "scroll through".  This approach
  13.             is limited by the amount of free memory available to the
  14.             string array.  To place 6000 records in a scroll window,
  15.             with each record requiring a string of 50 bytes to represent
  16.             it, requires 300,000 bytes of free memory.  QuickBASIC is
  17.             limited to 64K of string space for variable length string
  18.             arrays.  Although BASIC 7+ (PDS) does not share this
  19.             restriction by using far strings, 300,000 bytes would not
  20.             leave room available for other data or code.  In the QBX
  21.             environment 300,000 bytes of free string space is not
  22.             available.
  23.  
  24.          2. The second approach involves the use of "EXTENDED" scroll
  25.             windows.  If an EXTENDED scroll window has seven interior
  26.             rows it is only necessary to place seven records in it at a
  27.             time.  This saves 299,650 bytes of memory usage as
  28.             compared to the previous approach!!   Any attempt to scroll
  29.             before the first entry or beyond the last entry in an
  30.             EXTENDED scroll window causes the scroll routine to be
  31.             exited.  This gives the programmer the opportunity to
  32.             read a new record, or records, from the data file and
  33.             "refresh" the string array required by the scroll window.
  34.  
  35.             Two examples are included.  One uses a random access data
  36.             file.  The other uses an ISAM data file.  The ISAM example
  37.             may be used by users of BASIC 7+.  ALTHOUGH THE ISAM EXAMPLE
  38.             CAN NOT BE USED WITH QB 4+, IT CAN BE USED AS A TEMPLATE FOR
  39.             BTRIEVE OR OTHER DATA MANAGERS.
  40.  
  41.             To use the examples the data files must be "built".  Two
  42.             programs MAKERAND.BAS and MAKEISAM.BAS handle this chore.
  43.             Simply load and run these programs.  MAKERAND.BAS makes a
  44.             random access data file, RANDDATA.DAT.   MAKEISAM.BAS makes
  45.             an ISAM data file, ISAMDATA.DAT. It requires TSR, PROISAMD.
  46.             If MAKEISAM.BAS is run and the data file, ISAMDATA.DAT,
  47.             already exists an error will be reported.
  48.  
  49.             Two BASIC programs are provided which will scroll through
  50.             the newly built data files.  SCRLRAND.BAS scrolls through
  51.             RANDDATA.DAT while SCRLISAM.BAS scrolls through
  52.             ISAMDATA.DAT.  To use SCRLISAM.BAS, TSR, PROISAMD must be
  53.             resident.  The data files should reside on a hard drive or
  54.             in a RAM drive.  Although the files may be on a floppy there
  55.             will be a considerable reduction in speed if they are.
  56.  
  57.             The appropriate data file ( RANDDATA.DAT or ISAMDATA.DAT )
  58.             must be in the current drive/directory.  There is no error
  59.             checking for same.
  60.  
  61.             The correct WINDOWS R-E-Z library must be loaded with QB or
  62.             QBX to use SCRLRAND.BAS or SCRLISAM.BAS.  See the remarks at
  63.             the start of the code for details.
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.